<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="testing_v1.html">Cloud Testing API</a> . <a href="testing_v1.projects.html">projects</a> . <a href="testing_v1.projects.deviceSessions.html">deviceSessions</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel Changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.</p>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">POST /v1/projects/{project_id}/deviceSessions</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
  <pre>POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel Changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.

Args:
  name: string, Required. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot; (required)
  body: object, The request body.
    The object takes the form of:

{ # The request object for cancelling a Device Session.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
  <pre>POST /v1/projects/{project_id}/deviceSessions

Args:
  parent: string, Required. The Compute Engine project under which this device will be allocated. &quot;projects/{project_id}&quot; (required)
  body: object, The request body.
    The object takes the form of:

{ # Protobuf message describing the device message, used from several RPCs.
  &quot;activeStartTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the session first became ACTIVE.
  &quot;androidDevice&quot;: { # A single Android device. # Required. The requested device
    &quot;androidModelId&quot;: &quot;A String&quot;, # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;androidVersionId&quot;: &quot;A String&quot;, # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;locale&quot;: &quot;A String&quot;, # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;orientation&quot;: &quot;A String&quot;, # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the Session was created.
  &quot;displayName&quot;: &quot;A String&quot;, # Output only. The title of the DeviceSession to be presented in the UI.
  &quot;expireTime&quot;: &quot;A String&quot;, # Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
  &quot;inactivityTimeout&quot;: &quot;A String&quot;, # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
  &quot;name&quot;: &quot;A String&quot;, # Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot;
  &quot;state&quot;: &quot;A String&quot;, # Output only. Current state of the DeviceSession.
  &quot;stateHistories&quot;: [ # Output only. The historical state transitions of the session_state message including the current session state.
    { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
      &quot;eventTime&quot;: &quot;A String&quot;, # Output only. The time that the session_state first encountered that state.
      &quot;sessionState&quot;: &quot;A String&quot;, # Output only. The session_state tracked by this event
      &quot;stateMessage&quot;: &quot;A String&quot;, # Output only. A human-readable message to explain the state.
    },
  ],
  &quot;ttl&quot;: &quot;A String&quot;, # Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Protobuf message describing the device message, used from several RPCs.
  &quot;activeStartTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the session first became ACTIVE.
  &quot;androidDevice&quot;: { # A single Android device. # Required. The requested device
    &quot;androidModelId&quot;: &quot;A String&quot;, # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;androidVersionId&quot;: &quot;A String&quot;, # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;locale&quot;: &quot;A String&quot;, # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;orientation&quot;: &quot;A String&quot;, # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the Session was created.
  &quot;displayName&quot;: &quot;A String&quot;, # Output only. The title of the DeviceSession to be presented in the UI.
  &quot;expireTime&quot;: &quot;A String&quot;, # Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
  &quot;inactivityTimeout&quot;: &quot;A String&quot;, # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
  &quot;name&quot;: &quot;A String&quot;, # Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot;
  &quot;state&quot;: &quot;A String&quot;, # Output only. Current state of the DeviceSession.
  &quot;stateHistories&quot;: [ # Output only. The historical state transitions of the session_state message including the current session state.
    { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
      &quot;eventTime&quot;: &quot;A String&quot;, # Output only. The time that the session_state first encountered that state.
      &quot;sessionState&quot;: &quot;A String&quot;, # Output only. The session_state tracked by this event
      &quot;stateMessage&quot;: &quot;A String&quot;, # Output only. A human-readable message to explain the state.
    },
  ],
  &quot;ttl&quot;: &quot;A String&quot;, # Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.

Args:
  name: string, Required. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot; (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Protobuf message describing the device message, used from several RPCs.
  &quot;activeStartTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the session first became ACTIVE.
  &quot;androidDevice&quot;: { # A single Android device. # Required. The requested device
    &quot;androidModelId&quot;: &quot;A String&quot;, # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;androidVersionId&quot;: &quot;A String&quot;, # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;locale&quot;: &quot;A String&quot;, # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;orientation&quot;: &quot;A String&quot;, # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the Session was created.
  &quot;displayName&quot;: &quot;A String&quot;, # Output only. The title of the DeviceSession to be presented in the UI.
  &quot;expireTime&quot;: &quot;A String&quot;, # Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
  &quot;inactivityTimeout&quot;: &quot;A String&quot;, # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
  &quot;name&quot;: &quot;A String&quot;, # Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot;
  &quot;state&quot;: &quot;A String&quot;, # Output only. Current state of the DeviceSession.
  &quot;stateHistories&quot;: [ # Output only. The historical state transitions of the session_state message including the current session state.
    { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
      &quot;eventTime&quot;: &quot;A String&quot;, # Output only. The time that the session_state first encountered that state.
      &quot;sessionState&quot;: &quot;A String&quot;, # Output only. The session_state tracked by this event
      &quot;stateMessage&quot;: &quot;A String&quot;, # Output only. A human-readable message to explain the state.
    },
  ],
  &quot;ttl&quot;: &quot;A String&quot;, # Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.

Args:
  parent: string, Required. The name of the parent to request, e.g. &quot;projects/{project_id}&quot; (required)
  filter: string, Optional. If specified, responses will be filtered by the given filter. Allowed fields are: session_state.
  pageSize: integer, Optional. The maximum number of DeviceSessions to return.
  pageToken: string, Optional. A continuation token for paging.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A list of device sessions.
  &quot;deviceSessions&quot;: [ # The sessions matching the specified filter in the given cloud project.
    { # Protobuf message describing the device message, used from several RPCs.
      &quot;activeStartTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the session first became ACTIVE.
      &quot;androidDevice&quot;: { # A single Android device. # Required. The requested device
        &quot;androidModelId&quot;: &quot;A String&quot;, # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
        &quot;androidVersionId&quot;: &quot;A String&quot;, # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
        &quot;locale&quot;: &quot;A String&quot;, # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
        &quot;orientation&quot;: &quot;A String&quot;, # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the Session was created.
      &quot;displayName&quot;: &quot;A String&quot;, # Output only. The title of the DeviceSession to be presented in the UI.
      &quot;expireTime&quot;: &quot;A String&quot;, # Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
      &quot;inactivityTimeout&quot;: &quot;A String&quot;, # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
      &quot;name&quot;: &quot;A String&quot;, # Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot;
      &quot;state&quot;: &quot;A String&quot;, # Output only. Current state of the DeviceSession.
      &quot;stateHistories&quot;: [ # Output only. The historical state transitions of the session_state message including the current session state.
        { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
          &quot;eventTime&quot;: &quot;A String&quot;, # Output only. The time that the session_state first encountered that state.
          &quot;sessionState&quot;: &quot;A String&quot;, # Output only. The session_state tracked by this event
          &quot;stateMessage&quot;: &quot;A String&quot;, # Output only. A human-readable message to explain the state.
        },
      ],
      &quot;ttl&quot;: &quot;A String&quot;, # Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask.

Args:
  name: string, Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot; (required)
  body: object, The request body.
    The object takes the form of:

{ # Protobuf message describing the device message, used from several RPCs.
  &quot;activeStartTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the session first became ACTIVE.
  &quot;androidDevice&quot;: { # A single Android device. # Required. The requested device
    &quot;androidModelId&quot;: &quot;A String&quot;, # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;androidVersionId&quot;: &quot;A String&quot;, # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;locale&quot;: &quot;A String&quot;, # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;orientation&quot;: &quot;A String&quot;, # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the Session was created.
  &quot;displayName&quot;: &quot;A String&quot;, # Output only. The title of the DeviceSession to be presented in the UI.
  &quot;expireTime&quot;: &quot;A String&quot;, # Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
  &quot;inactivityTimeout&quot;: &quot;A String&quot;, # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
  &quot;name&quot;: &quot;A String&quot;, # Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot;
  &quot;state&quot;: &quot;A String&quot;, # Output only. Current state of the DeviceSession.
  &quot;stateHistories&quot;: [ # Output only. The historical state transitions of the session_state message including the current session state.
    { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
      &quot;eventTime&quot;: &quot;A String&quot;, # Output only. The time that the session_state first encountered that state.
      &quot;sessionState&quot;: &quot;A String&quot;, # Output only. The session_state tracked by this event
      &quot;stateMessage&quot;: &quot;A String&quot;, # Output only. A human-readable message to explain the state.
    },
  ],
  &quot;ttl&quot;: &quot;A String&quot;, # Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
}

  updateMask: string, Required. The list of fields to update.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Protobuf message describing the device message, used from several RPCs.
  &quot;activeStartTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the session first became ACTIVE.
  &quot;androidDevice&quot;: { # A single Android device. # Required. The requested device
    &quot;androidModelId&quot;: &quot;A String&quot;, # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;androidVersionId&quot;: &quot;A String&quot;, # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;locale&quot;: &quot;A String&quot;, # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
    &quot;orientation&quot;: &quot;A String&quot;, # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the Session was created.
  &quot;displayName&quot;: &quot;A String&quot;, # Output only. The title of the DeviceSession to be presented in the UI.
  &quot;expireTime&quot;: &quot;A String&quot;, # Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
  &quot;inactivityTimeout&quot;: &quot;A String&quot;, # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
  &quot;name&quot;: &quot;A String&quot;, # Optional. Name of the DeviceSession, e.g. &quot;projects/{project_id}/deviceSessions/{session_id}&quot;
  &quot;state&quot;: &quot;A String&quot;, # Output only. Current state of the DeviceSession.
  &quot;stateHistories&quot;: [ # Output only. The historical state transitions of the session_state message including the current session state.
    { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
      &quot;eventTime&quot;: &quot;A String&quot;, # Output only. The time that the session_state first encountered that state.
      &quot;sessionState&quot;: &quot;A String&quot;, # Output only. The session_state tracked by this event
      &quot;stateMessage&quot;: &quot;A String&quot;, # Output only. A human-readable message to explain the state.
    },
  ],
  &quot;ttl&quot;: &quot;A String&quot;, # Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
}</pre>
</div>

</body></html>